Devices using various types of sensors for counting people passing an area have been developed, such as described for example in U.S. Pat. Nos. 4,278,878, 5,187,688, 6,327,547, 4,303,851, 5,656,801, 4,799,243, and 6,712,269. However, such have not been incorporated using video surveillance type cameras such as often used in facility protection systems for building(s) near entrances/exits of such building(s) having doors. In situation of external windowed doors, with direct light on the surface under the camera, opening of the doors and entering people might cause dynamic blobs of lights that can confuse the counting. Ambient light is often the cause for such blobs of light which may deflect from swinging door surfaces, but can also be cause in some situations by artificial light sources, such as automobile lights, lamps, or high luminescent luminaries often present in parking lots. Thus, a counting system using a camera that can efficiently count people without being negatively effected by such dynamic light is desirable.